package com.cms.certificate.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cms.certificate.mapper.CmsCertificateMapper;
import com.cms.certificate.domain.CmsCertificate;
import com.cms.certificate.service.ICmsCertificateService;

/**
 * 证书文件Service业务层处理
 * 
 * @author rjxy
 * @date 2025-09-29
 */
@Service
public class CmsCertificateServiceImpl implements ICmsCertificateService 
{
    @Autowired
    private CmsCertificateMapper cmsCertificateMapper;

    /**
     * 查询证书文件
     * 
     * @param id 证书文件主键
     * @return 证书文件
     */
    @Override
    public CmsCertificate selectCmsCertificateById(Long id)
    {
        return cmsCertificateMapper.selectCmsCertificateById(id);
    }

    /**
     * 查询证书文件列表
     * 
     * @param cmsCertificate 证书文件
     * @return 证书文件
     */
    @Override
    public List<CmsCertificate> selectCmsCertificateList(CmsCertificate cmsCertificate)
    {
        return cmsCertificateMapper.selectCmsCertificateList(cmsCertificate);
    }

    /**
     * 新增证书文件
     * 
     * @param cmsCertificate 证书文件
     * @return 结果
     */
    @Override
    public int insertCmsCertificate(CmsCertificate cmsCertificate)
    {
        return cmsCertificateMapper.insertCmsCertificate(cmsCertificate);
    }

    /**
     * 修改证书文件
     * 
     * @param cmsCertificate 证书文件
     * @return 结果
     */
    @Override
    public int updateCmsCertificate(CmsCertificate cmsCertificate)
    {
        return cmsCertificateMapper.updateCmsCertificate(cmsCertificate);
    }

    /**
     * 批量删除证书文件
     * 
     * @param ids 需要删除的证书文件主键
     * @return 结果
     */
    @Override
    public int deleteCmsCertificateByIds(Long[] ids)
    {
        return cmsCertificateMapper.deleteCmsCertificateByIds(ids);
    }

    /**
     * 删除证书文件信息
     * 
     * @param id 证书文件主键
     * @return 结果
     */
    @Override
    public int deleteCmsCertificateById(Long id)
    {
        return cmsCertificateMapper.deleteCmsCertificateById(id);
    }
}
